package com.hxexp.weixin.test.api;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import com.hxexp.weixin.common.exception.APIException;
import com.hxexp.weixin.hpe.api.returnamount.ReturnAmountAPI;
import com.hxexp.weixin.hpe.api.returnamount.model.ReturnAmountParamBean;
import com.hxexp.weixin.hpe.api.returnamount.model.ReturnAmountResultBean;
import com.hxexp.weixin.test.runner.JUnit4WithSpringLogClassRunner;

/**
 * HPE可退金额接口实现类测试
 *
 * @author wang.bin
 *
 */
@RunWith(JUnit4WithSpringLogClassRunner.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@ContextConfiguration(locations = { "classpath:conf/spring/spring-biz.xml", "classpath:conf/spring/spring-ehcache.xml" })
public class ReturnAmountAPIImplTester {

    @Autowired
    private ReturnAmountAPI returnAmountAPI;

    @Test
    public void testCase01() throws APIException {

        ReturnAmountParamBean returnAmountParamBean = new ReturnAmountParamBean();
        ReturnAmountResultBean returnValue = new ReturnAmountResultBean();
        // 设置请求参数
        returnAmountParamBean.setTicketId("8283810");

        returnValue = returnAmountAPI.getReturnAmount(returnAmountParamBean);
        System.out.println(returnValue);
    }
}
